package com.photoeditor.demo.model.bean.face;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * @author lyzirving
 * time        2018/11/6
 * email       lyzirving@sina.com
 * information
 */
public class FaceAgingFaceBean extends BaseFaceScanBean implements Parcelable {

    private FaceContour faceContour;//人脸关键点

    private int left;//人脸检测区域左边缘
    private int top;//人脸检测区域上边缘
    private int width;//人脸检测区域宽度
    private int height;//人脸检测区域高度

    private String rectangle;//按top、left、width、height的顺序拼接而成的字符串，如"top,left,width,height"

    private String requestId;//用于区分每次请求的字符串

    private String gender;//性别
    private String ethnicity;//种族

    public FaceContour getFaceContour() {
        return faceContour;
    }

    public void setFaceContour(FaceContour faceContour) {
        this.faceContour = faceContour;
    }

    public String getRectangle() {
        return rectangle;
    }

    public void setRectangle(String rectangle) {
        this.rectangle = rectangle;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public String getEthnicity() {
        return ethnicity;
    }

    public void setEthnicity(String ethnicity) {
        this.ethnicity = ethnicity;
    }

    public int getLeft() {
        return left;
    }

    public void setLeft(int left) {
        this.left = left;
    }

    public int getTop() {
        return top;
    }

    public void setTop(int top) {
        this.top = top;
    }

    public int getWidth() {
        return width;
    }

    public void setWidth(int width) {
        this.width = width;
    }

    public int getHeight() {
        return height;
    }

    public void setHeight(int height) {
        this.height = height;
    }

    public String getRequestId() {
        return requestId;
    }

    public void setRequestId(String requestId) {
        this.requestId = requestId;
    }

    public FaceAgingFaceBean() {
        super();
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        super.writeToParcel(dest, flags);
        dest.writeParcelable(this.faceContour, flags);
        dest.writeInt(this.left);
        dest.writeInt(this.top);
        dest.writeInt(this.width);
        dest.writeInt(this.height);
        dest.writeString(this.rectangle);
        dest.writeString(this.requestId);
        dest.writeString(this.gender);
        dest.writeString(this.ethnicity);
    }

    protected FaceAgingFaceBean(Parcel in) {
        super(in);
        this.faceContour = in.readParcelable(FaceContour.class.getClassLoader());
        this.left = in.readInt();
        this.top = in.readInt();
        this.width = in.readInt();
        this.height = in.readInt();
        this.rectangle = in.readString();
        this.requestId = in.readString();
        this.gender = in.readString();
        this.ethnicity = in.readString();
    }

    public static final Creator<FaceAgingFaceBean> CREATOR = new Creator<FaceAgingFaceBean>() {
        @Override
        public FaceAgingFaceBean createFromParcel(Parcel source) {
            return new FaceAgingFaceBean(source);
        }

        @Override
        public FaceAgingFaceBean[] newArray(int size) {
            return new FaceAgingFaceBean[size];
        }
    };
}
